<?php
/*
 +----------------------------------------------------------------------
 + Title        : Validate 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2021/4/1 6:46
 + Last-time    : 2021/4/1 6:46+ chen2
 + Desc         : Validate
 +----------------------------------------------------------------------
*/

namespace app\common\attributes;

use Attribute;

#[Attribute(Attribute::TARGET_METHOD)]
class Menu
{
    public ?string $name;
    public ?string $auth;

    public function __construct(?string $name = null)
    {
        $this->name = $name;
    }

    public function run(&$params)
    {
        set_menu($this->name);
    }
}
